package com.wardrobe.dao.userinfo;

import com.wardrobe.domain.userinfo.UserInfoBean;
import com.wardrobe.domain.userinfo.UserInfoShowBean;
import com.wardrobe.mapper.master.userinfo.UserInfoMasterMapper;
import com.wardrobe.mapper.slave.userinfo.UserInfoSlaveMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by Administrator on 2018/11/14.
 */
@Service
public class UserInfoDao {
    @Autowired
    private UserInfoMasterMapper userInfoMasterMapper;
    @Autowired
    private UserInfoSlaveMapper userInfoSlaveMapper;

    public int insertUserInfo(UserInfoBean bean){
        return userInfoMasterMapper.insertUserInfo(bean);
    }

    public int updateUserInfoById(UserInfoBean bean){
        return userInfoMasterMapper.updateUserInfoById(bean);
    }

    public UserInfoShowBean selectUserInfo(long userId){
        return userInfoSlaveMapper.selectUserInfo(userId);
    }
}
